function getPermissionList(){
    return [
        {
            id: 1,
            pid: 0,
            name: '用户管理',
            level:1
        },
        {
            id: 2,
            pid: 0,
            name: '权限管理',
            level:1
        },
        {
            id: 3,
            pid: 0,
            name: '角色管理',
            level:1,
            children: [
                {
                    id: 31,
                    pid: 3,
                    name: '新增角色',
                    slug: 'haha',
                    level:2
                },
                {
                    id: 32,
                    pid: 3,
                    name: '编辑角色',
                    slug: 'haha2',
                    level:2
                },
            ],
        }
    ]
}

export default[
    {
        url:'/permission/list',
        method:'get',
        response:({ query })=>{
            const permissionList = getPermissionList();
            return { code :'200' ,data:{data:[...permissionList ]}}
        }
    },
]